package com.wonsec.useragent.controller;

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.Collections;

/**
 * @Author： mzy
 * @Date： 2025/5/13 下午2:47
 * @Describe：
 */
@RestController
@RequestMapping("/api")
public class ApiController {

    @GetMapping("/info")
    public ResponseEntity<?> getInfo(HttpServletRequest request) {
        String channel = (String) request.getSession().getAttribute("access_channel");
        return ResponseEntity.ok(Collections.singletonMap("channel", channel));
    }
}
